package com.rockxin.cat.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.rockxin.cat.R;
import com.rockxin.cat.bean.RecommendAwardBean;

import java.util.List;

import de.hdodenhof.circleimageview.CircleImageView;

/**
 * <b>类名称：    RecommendAwardAdapter             <br/>
 * <b>类描述：                        <br/>
 * <b>创建人：    Lans               <br/>
 * <b>创建时间：  2018/3/4 18:48     <br/>
 * <b>修改人：                        <br/>
 * <b>修改时间：                      <br/>
 * <b>修改备注：                      <br/>
 *
 * @version 1.0.0 <br/>
 */
public class RecommendAwardAdapter extends BaseQuickAdapter<RecommendAwardBean, BaseViewHolder> {
    public RecommendAwardAdapter(@Nullable List<RecommendAwardBean> data) {
        super(R.layout.activity_recommend_award_item, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, RecommendAwardBean item) {
        CircleImageView inviteImg = helper.getView(R.id.inviteImg);
        Glide.with(mContext)
                .load(item.getAvatar())
                .into(inviteImg);

        helper.setText(R.id.dateAndTel, "邀请时间："+item.getCreate_time() +"\n"+ item.getMobile());
    }
}
